<?php

namespace App\HttpController\Api\Admin;

use App\Service\Admin\DictTypeService;
use Swoole\Http\Status;

/**
 * 字典类型管理-控制器
 * @author LZH
 * @since: 2021/08/12
 * Class DictType
 * @property DictTypeService $service
 */
class DictType extends AdminBase
{
    /**
     * 初始化方法
     * @author LZH
     * @since: 2021/08/12
     */
    protected function init(): void
    {
        $this->service = new DictTypeService();
    }

    public function grade_duty_code()
    {
        return $this->message(Status::OK, $this->service->getDictionaryByDictType('grade_duty_code'));
    }

    public function class_duty_code()
    {
        return $this->message(Status::OK, $this->service->getDictionaryByDictType('class_duty_code'));
    }

    public function subject_code()
    {
        return $this->message(Status::OK, $this->service->getDictionaryByDictType('subject_type'));
    }
}
